import React,{useState} from 'react'

export default function Function() {
    const [name,setName]=useState('张三')
   function changeName(){
        setName("李四")
    }
  return (
    <div><span style={{color:'red'}}>名字:{name}</span> <button onClick={changeName}>修改名字</button></div>
  )
}
